package temp
{
	import flash.display.DisplayObjectContainer;
	import flash.display.MovieClip;
	import flash.system.ApplicationDomain;
	import flash.utils.getDefinitionByName;
	/**
	 * ...
	 * @author fly
	 */
	public class GetProp
	{
		static public function getPropIcon(frame:int, lan:String = ""):MovieClip
		{
			var mc:MovieClip = new MovieClip();
			var resource:Class;
			resource = Class(getDefinitionByName("com.boyaa.shells.view.ViewPropIcon" + frame + lan));
			mc = new resource();
			mc.cacheAsBitmap = true;
			return mc;
		}
		
		
		static public function getPropBtnIcon(frame:int, lan:String = ""):MovieClip
		{
			var mc:MovieClip = new MovieClip();
			var resource:Class;
			resource = Class(getDefinitionByName("com.boyaa.shells.view.ViewPropBtn" + frame + lan));
			mc = new resource();
			mc.cacheAsBitmap = true;
			mc.lock.visible = false;
			return mc;
		}
		
		/**
		 *  用名字拿資源
		 * @param	str
		 * @return
		 */
		static public function getResourceByFullname(str:String):*
		{
			var resource:Class;
			resource = Class(getDefinitionByName(str));
			return new resource();
		}
		
		/**
		 *  用名字拿資源
		 * @param	str
		 * @return
		 */
		static public function getResourceByName(str:String):MovieClip
		{
			var mc:MovieClip;
			var resource:Class;
			resource = Class(getDefinitionByName("com.boyaa.shells.view." + str));
			mc = new resource();
			//mc.cacheAsBitmap = true;
			return mc;
		}
		
		/**
		 *  用名字拿資源
		 * @param	str
		 * @return
		 */
		static public function getCopyResourceByName(str:String):MovieClip
		{
			var mc:MovieClip = new MovieClip();
			var resource:Class;
			resource = Class(getDefinitionByName("com.boyaa.shells.view.fb." + str));
			mc = new resource();
			//mc.cacheAsBitmap = true;
			return mc;
		}
		/**
		 *  用名字拿資源
		 * @param	str
		 * @return
		 */
		static public function getHomeResourceByName(str:String):MovieClip
		{
			var mc:MovieClip = new MovieClip();
			var resource:Class;
			resource = Class(getDefinitionByName("com.boyaa.shells.modules.home.view." + str));
			mc = new resource();
			//mc.cacheAsBitmap = true;
			return mc;
		}
		
		/**
		 * 用名字拿资源 - IM聊天
		 * @param	str
		 * @return
		 */
		static public function getIMResourceByName(str:String):MovieClip
		{
			var mc:MovieClip = new MovieClip();
			var resource:Class;
			resource = Class(getDefinitionByName("com.boyaa.shells.modules.company.view." + str));
			mc = new resource();
			//mc.cacheAsBitmap = true;
			return mc;
		}
		
		/**
		 * 用名字拿资源 - 副本
		 * @param	str
		 * @return
		 */
		static public function getDuplicateResourceByName(str:String):MovieClip
		{
			var mc:MovieClip = new MovieClip();
			var resource:Class;
			resource = Class(getDefinitionByName("com.boyaa.shells.modules.duplicate.view." + str));
			mc = new resource();
			//mc.cacheAsBitmap = true;
			return mc;
		}
		
		/**
		 * 用名字拿资源 - 公会
		 * @param	str
		 * @return
		 */
		static public function getUnionResourceByName(str:String):MovieClip
		{
			var mc:MovieClip = new MovieClip();
			var resource:Class;
			resource = Class(getDefinitionByName("com.boyaa.shells.modules.union.view." + str));
			mc = new resource();
			mc.cacheAsBitmap = true;
			return mc;
		}
		
		/**
		 * 用名字拿资源 - 结婚
		 * @param	str
		 * @return
		 */
		static public function getMarryResourceByName(str:String):MovieClip
		{
			var mc:MovieClip = new MovieClip();
			var resource:Class;
			resource = Class(getDefinitionByName("com.boyaa.shells.modules.marry.view." + str));
			mc = new resource();
			mc.cacheAsBitmap = true;
			return mc;
		}
		
}
}